<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>导航条</title>
    <style type="text/css">
        *{
            margin: 0;
            padding: 0;
        }
        ul{
            /*去掉默认风格-实心远点*/
            list-style: none;
            width: 1000px;
            margin: 50px auto;
            background-color: #6595ED;

            /*子元素浮动后导致父元素高度塌陷*/
            overflow: hidden;
            zoom: 1;

        }
        li{
            float: left;
            width: 25%;
        }
        a{
            display: block;
            width: 100%;
            text-align: center;
            padding: 5px 0;
            text-decoration: none;
            color: white;
            font-weight: bold;
        }
        a:hover {
            background-color: #cc0000;
        }
    </style>
</head>
<body>
    <ul>
        <li><a href="#">首页</a></li>
        <li><a href="#">新闻</a></li>
        <li><a href="#">联系</a></li>
        <li><a href="#">关于</a></li>
    </ul>
</body>
</html>